﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Studio77.GuessTheWords2.Core;
using Studio77.GuessTheWords2.Model;
using Studio77.GuessTheWords2.Pages;

namespace Studio77.GuessTheWords2.Views
{
    public partial class StageItemView : UserControl
    {
        public StageItemView()
        {
            InitializeComponent();
        }

        private void Button_Click_1(object sender, System.Windows.RoutedEventArgs e)
        {
            SoundManager.PlayEffect(SoundManager.buttonClick);
        	// 在此处添加事件处理程序实现。
            // 跳转到游戏界面
            StageManager.Instance.CurrentStage = ((StageInfoViewModel)this.DataContext).Index;
            StageManager.Instance.LastClass = StageManager.Instance.CurrentClass;
            StageManager.Instance.LastStage = StageManager.Instance.CurrentStage;
            StagePage.Instance.NavigationService.Navigate(new Uri("/Pages/GamePage.xaml", UriKind.RelativeOrAbsolute));
        }
    }
}
